package cn.ekuma.pos.toolcommand.base;

import net.xeoh.plugins.base.annotations.PluginImplementation;
import cn.ekuma.epos.datalogic.I_DataLogicERP;
import cn.ekuma.epos.toolcommand.AbstractCommand;

import com.openbravo.data.basic.BasicException;
import com.openbravo.data.gui.MessageInf;

@PluginImplementation
public class RestoreDbCommand  extends AbstractCommand {

	@Override
	public void call() throws BasicException {
		try{
	        ((I_DataLogicERP)dataLogic).restoreDb();
	        new MessageInf(MessageInf.SGN_SUCCESS,"执行成功").show(null);
	    }catch (BasicException e) {
		    e.printStackTrace();
		    new MessageInf(e).show(null);
        }
	}

	@Override
	public String getCommandName() {
		return "恢复备份数据";
	}

	@Override
	public String getCommandCategoryName() {
		return "系统";
	}

}
